/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-08-21 18:37:55
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-08-24 11:35:39
 * @FilePath: \四阶段\src\service\loginlog\loginlogService.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from "../utils/axios";
import api from '../api'

//登录日志获取工单列表请求
export function getAllDataList(currentPage,pageSize){
   return new Promise((reslove,reject)=>{
      axios({
        url:api.LoginApi.LOGINLOGALL_DATA,
        method:'get',
        params:{
         currentPage,
         pageSize
        }
      }).then((res)=>{
          console.log(res,'登录日志获取工单列表请求');
          reslove(res.data)
      }).catch((err)=>{
            console.log(err);
      })
   }) 
} 

 //快速搜索按钮发起请求
 export function searvhBtn(data){
   return new Promise((reslove,reject)=>{
      axios({
        url:api.LoginApi.LOGINLOGALL_DATA,
        method:'get',
        params:
         data
       
      }).then((res)=>{
          console.log(res,'快速搜索按钮请求');
          reslove(res.data)
      }).catch((err)=>{
            console.log(err);
      })
   }) 
}
//删除所有
 export function deleteAllData(data){
   return new Promise((reslove,reject)=>{
      axios({
         url:api.LoginApi.DELETEALLDATA_QING,
         method:'post',
         data
      }).then((res)=>{
         reslove(res.data)
         console.log(res.data,'删除所有');
      })
   })
 }
//删除按钮
export function deleteBtn(login_id){
   return new Promise((reslove,reject)=>{
      axios({
         url:api.LoginApi.DELETEBTN_QING,
         method:'post',
         params:{login_id}
      }).then((res)=>{
         reslove(res.data)
         console.log(res.data,'删除按钮');
      })
   })
}